import http from "./http";
//预登录
export const getLoginKey = (data) => http.get("user/key", data);
//用户注册
export const postRegistry = (data) => http.post("user/registry", data);
//用户登录
export const postLogin = (data) => http.post("user/login", data);

//主页商品列表请求
export const goodsListApi = (data) => http.post("commodity/goodslist", data);
//商品详情请求
export const getDetail = (data) => http.get("commodity/detail", data);

// 列表请求
export const postList = (data) => http.post("classify/tablist", data);
//搜索
export const getsearch = (data) => http.get("commodity/search", data);

//购物车请求
export const postUserCartListApi = (data) => http.post("user/cartlist", data);
export const getCommodityDetailApi = (data) =>
  http.get("commodity/detail", data);
export const postUpdateCartListApi = (data) =>
  http.post("user/updatecart", data);
//订单更新
export const postUserOrderListApi = (data) => http.post("user/orderlist", data);
export const postUpdateOrderListApi = (data) =>
  http.post("user/updateorder", data);

//社区请求
export const getCommunityListApi = (data) =>
  http.get("user/allquestions", data);

//其他用户详情的问答
export const getQueanswerApi = (data) => http.get("user/queanswers", data);


//用户更新问题
export const postUpdataApi = (data) => http.post("user/updateque", data);

//用户回答消息
export const getReplyListApi=(data)=>http.get("user/queanswers",data);

//回复消息
export const postReplyApi=(data)=>http.post("user/updateans",data);

//我的信息请求
export const getUerInfoList = (data) => http.get("user/userinfo", data);
export const getUerMinepetsList = (data) => http.get("user/minepets", data);
//更新我的信息
export const postUpdateInfoList = (data) => http.post("user/updateinfo", data);
//添加宠物接口调用
export const postUserAddPetsList = (data) => http.post("user/addpet", data);
